.class Lrexsee/multimedia/RexseeCamera$1$1;
.super Ljava/lang/Thread;
.source "RexseeCamera.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lrexsee/multimedia/RexseeCamera$1;->run(Landroid/content/Context;Lrexsee/core/browser/Browser;Ljava/lang/String;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$1:Lrexsee/multimedia/RexseeCamera$1;

.field private final synthetic val$browser:Lrexsee/core/browser/Browser;

.field private final synthetic val$url:Ljava/lang/String;


# direct methods
.method constructor <init>(Lrexsee/multimedia/RexseeCamera$1;Ljava/lang/String;Lrexsee/core/browser/Browser;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lrexsee/multimedia/RexseeCamera$1$1;->this$1:Lrexsee/multimedia/RexseeCamera$1;

    iput-object p2, p0, Lrexsee/multimedia/RexseeCamera$1$1;->val$url:Ljava/lang/String;

    iput-object p3, p0, Lrexsee/multimedia/RexseeCamera$1$1;->val$browser:Lrexsee/core/browser/Browser;

    .line 60
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 12

    .prologue
    const/4 v3, 0x0

    const/4 v10, 0x1

    const/4 v9, 0x0

    const-string v11, "content://media/external/images/media"

    .line 63
    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "<HTML><HEAD><TITLE>"

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v2, p0, Lrexsee/multimedia/RexseeCamera$1$1;->val$url:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "</TITLE></HEAD>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 64
    .local v7, "html":Ljava/lang/String;
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v7}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "<BODY style=\'margin:0px;background-color:black;color:white;\'>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 65
    iget-object v1, p0, Lrexsee/multimedia/RexseeCamera$1$1;->this$1:Lrexsee/multimedia/RexseeCamera$1;

    # getter for: Lrexsee/multimedia/RexseeCamera$1;->this$0:Lrexsee/multimedia/RexseeCamera;
    invoke-static {v1}, Lrexsee/multimedia/RexseeCamera$1;->access$0(Lrexsee/multimedia/RexseeCamera$1;)Lrexsee/multimedia/RexseeCamera;

    move-result-object v1

    # getter for: Lrexsee/multimedia/RexseeCamera;->mBrowser:Lrexsee/core/browser/Browser;
    invoke-static {v1}, Lrexsee/multimedia/RexseeCamera;->access$0(Lrexsee/multimedia/RexseeCamera;)Lrexsee/core/browser/Browser;

    move-result-object v1

    invoke-virtual {v1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    .line 66
    .local v0, "contentResolver":Landroid/content/ContentResolver;
    iget-object v1, p0, Lrexsee/multimedia/RexseeCamera$1$1;->val$browser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->progressDialog:Lrexsee/core/progress/RexseeProgressDialog;

    sget-object v2, Lrexsee/core/lang/RexseeLanguage;->PROGRESS_ONGOING:Ljava/lang/String;

    invoke-virtual {v1, v2}, Lrexsee/core/progress/RexseeProgressDialog;->show(Ljava/lang/String;)V

    .line 67
    const-string v1, "content://media/external/images/media"

    invoke-static {v11}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v1

    const/4 v2, 0x2

    new-array v2, v2, [Ljava/lang/String;

    const-string v4, "_id"

    aput-object v4, v2, v9

    const-string v4, "_data"

    aput-object v4, v2, v10

    const-string v5, "_id desc"

    move-object v4, v3

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v6

    .line 68
    .local v6, "cursor":Landroid/database/Cursor;
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v7}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "<table width=100% cellspacing=0 style=\'color:white;font-size:16px;\'>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 69
    invoke-interface {v6}, Landroid/database/Cursor;->getCount()I

    move-result v1

    if-nez v1, :cond_1

    .line 70
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v7}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "<tr><td style=\'padding:10px;\'>No image found.</td></tr>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 77
    :cond_0
    invoke-interface {v6}, Landroid/database/Cursor;->close()V

    .line 78
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v7}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "</table>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 79
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v7}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "</BODY>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 80
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v7}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "</HTML>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 81
    iget-object v1, p0, Lrexsee/multimedia/RexseeCamera$1$1;->val$browser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->function:Lrexsee/core/browser/RexseeBrowser;

    invoke-virtual {v1, v7}, Lrexsee/core/browser/RexseeBrowser;->loadHTMLWithoutHistory(Ljava/lang/String;)V

    .line 82
    return-void

    .line 72
    :cond_1
    const/4 v8, 0x0

    .local v8, "i":I
    :goto_0
    invoke-interface {v6}, Landroid/database/Cursor;->getCount()I

    move-result v1

    if-ge v8, v1, :cond_0

    .line 73
    invoke-interface {v6, v8}, Landroid/database/Cursor;->moveToPosition(I)Z

    .line 74
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v7}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "<tr><td onclick=\""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lrexsee/multimedia/RexseeCamera$1$1;->val$browser:Lrexsee/core/browser/Browser;

    iget-object v2, v2, Lrexsee/core/browser/Browser;->function:Lrexsee/core/browser/RexseeBrowser;

    invoke-virtual {v2}, Lrexsee/core/browser/RexseeBrowser;->getInterfaceName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ".go(\'"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "content://media/external/images/media"

    invoke-virtual {v1, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "/"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-interface {v6, v9}, Landroid/database/Cursor;->getInt(I)I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\');\" style=\'border-bottom:1px solid #222222; padding:10 5 10 5;word-break:break-all;\'>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-interface {v6, v10}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "</td></tr>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 72
    add-int/lit8 v8, v8, 0x1

    goto :goto_0
.end method
